Dimension Types

نویسنده

  • Andrew Kennedy
چکیده

Scientists and engineers must ensure that physical equations are dimensionally consistent, but existing programming languages treat all numeric values as dimensionless. This paper extends a strongly-typed programming language with a notion of dimension type. Our approach improves on previous proposals in that dimension types may be polymorphic. Furthermore, any expression which is typable in the system has a most general type, and we describe an algorithm which infers this type automatically. The algorithm exploits equational unification over Abelian groups in addition to ordinary term unification. An implementation of the type system is described, extending the ML Kit compiler. Finally, we discuss the problem of obtaining a canonical form for principal types and sketch some more powerful systems which use dependent and higher-order polymorphic types.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Representation Dimension of Hecke Algebras and Symmetric Groups

We establish a lower bound for the representation dimension of all the classical Hecke algebras of types A, B and D. For all the type A algebras, and “most” of the algebras of types B and D, we also establish upper bounds. Moreover, we establish bounds for the representation dimension of group algebras of some symmetric groups.

متن کامل

Dimension Inference under Polymorphic

Numeric types can be given polymorphic dimension parameters , in order to avoid dimension errors and unit errors. The most general dimensions can be inferred automatically. It has been observed that polymorphic recursion is more important for the dimensions than for the proper types. We show that, under polymorphic recursion, type inference amounts to syntactic semi-uniication of proper types, ...

متن کامل

Diagnosis of B-CLL Leukemia Using Fractal Dimension

Background:Leukemia is cancer of blood and bone marrow cells. In general, there are four types of leukemia: chronic myelogenous leukemia (CML), acute myeloid leukemia (AML), B-cell chronic lymphocytic leukemia (CLL) and acute lymphoblastic leukemia (ALL).  Fractal geometry can be introduced as one of the effective ways to detect this type of cancer. In this study, with introduc...

متن کامل

Computational Higher Type Theory I: Abstract Cubical Realizability

The goal of this work is to develop a computation-based account of higher-dimensional type theory for which canonicity at observable types is true by construction. Types are considered as descriptions of the computational behavior of terms, rather than as formal syntax to which meaning is attached separately. Types are structured as collections of terms of each finite dimension. At dimension ze...

متن کامل

Hints and the VC Dimension

Learning from hints is a generalization of learning from examples that allows for a variety of information about the unknown function to be used in the learning process. In this paper, we use the VC dimension, an established tool for analyzing learning from examples, to analyze learning from hints. In particular, we show how the VC dimension is affected by the introduction of a hint. We also de...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1994